

#ifndef _DS1307_DRIVER
#define _DS1307_DRIVER


#define DS1307_ID    0xD0        // I2C DS1307 Device Identifier
#define DS1307_ADDR  0x00        // I2C DS1307 Device Address

void rtcInit(void);

unsigned char bcdToDec(unsigned char val);

void rtcGetTime(unsigned char * h, unsigned char * m, unsigned char * s);

unsigned char bcdToDec(unsigned char val);

void rtcSetTime(unsigned char h,unsigned char m, unsigned char s);

void rtcSetDate(unsigned char y, unsigned char m, unsigned char d);

void rtcGetDate(unsigned char * y, unsigned char * m, unsigned char * d);

#endif
